#ifndef __SENSORINTERFACE__
#define __SENSORINTERFACE__


#include <limits.h>


#define DATALEN_MAX 200
enum{
    RELEASED = 0,
    INITED,
    STARTED,
};

typedef int (*data_callback)(char *, int);//call back

typedef struct{
    char path[PATH_MAX];
    char grabing;
    int status;
    int fd;
    data_callback onreceivecb;
}sensorDevice_s;

int sensor_set_datacallback(data_callback onreceive);
int sensor_init(char *path);
int sensor_get_serialno(char *serialno);//serial number 4 bytes.
int sensor_start();
int sensor_stop();
int sensor_set_zoomlevel();//0h-6h
int sensor_set_baseline_pos();//0h-3h
int sensor_set_samplerate();//0h-200hz;1h-250hz;2h-400hz;3h-500hz
int sensor_release();


#endif
